CC=/home/sam/usr/bin/g++
target = sevent
srcs = Thread.cpp  main.cpp
libs =
subdirs=
INCLUDE=-I./ 
LIBRARY=-lpthread
CPPFLAGS+=-g -O2 -std=c++11
all : $(target)

objs=$(patsubst %.cpp, %.o, $(srcs))

all : $(target)

$(target) : $(objs) 
	for dir in $(subdirs); do make -C $$dir ; done
#	ar cr $(target) $^ $(libs)
	$(CC) $(INCLUDE) $(CPPFLAGS) -o $(target) $^ $(libs) $(LIBRARY) 

%.o : %.cpp
	$(CC) $(INCLUDE) $(CPPFLAGS) $< -c -o $@

.PHONY : clean
clean:
	rm -f $(objs)
	rm -f $(target)
